package com.xnyzc.lhy.common.penum.order;

public enum EOrderChannelType {
    ordinary(0, "自有"),
    /*didi(1, "滴滴"),*/
    tongcheng(2, "同程"),
    xiecheng(3, "携程");

    private Integer type;
    private String value;

    EOrderChannelType(Integer type, String value) {
        this.type = type;
        this.value = value;
    }

    public static EOrderChannelType findById(Integer type) {
        EOrderChannelType ePaymentType;
        switch (type) {
            case 0:
                ePaymentType = EOrderChannelType.ordinary;
                break;
            /*case 1:
                ePaymentType = EOrderChannelType.didi;
                break;*/
            case 2:
                ePaymentType = EOrderChannelType.tongcheng;
                break;
            case 3:
                ePaymentType = EOrderChannelType.xiecheng;
                break;
            default:
                throw new IllegalArgumentException("非法type");
        }
        return ePaymentType;
    }

    public String getValue() {
        return this.value;
    }

    public Integer getType() {
        return this.type;
    }
}
